using System.Collections.Generic;
using Orchard.ContentManagement;
using Orchard.Core.Title.Models;

namespace Orchard.Projections.Models
{
    public class QueryPart : ContentPart<QueryPartRecord>
    {

        public string Name
        {
            get { return this.As<TitlePart>().Title; }
            set { this.As<TitlePart>().Title = value; }
        }

        public QueryVersionScopeOptions VersionScope
        {
            get { return Retrieve(x => x.VersionScope); }
            set { Store(x => x.VersionScope, value); }
        }
        public IList<SortCriterionRecord> SortCriteria => Record.SortCriteria;

        public IList<FilterGroupRecord> FilterGroups => Record.FilterGroups;

        public IList<LayoutRecord> Layouts => Record.Layouts;
    }
}